package com.itheima.homework02;

import java.util.ArrayList;
import java.util.Collection;

public class Test02 {
    public static void main(String[] args) {
        Collection<Movie> movies = new ArrayList<>();
        movies.add(new Movie("肖申克的救赎",9.7,"罗宾斯"));
        movies.add(new Movie("霸王别姬",9.6,"张国荣、张丰毅"));
        movies.add(new Movie("阿甘正传",9.5,"汤姆.汉姆斯"));
        //循环遍历集合输出
        for (Movie movie : movies) {
            System.out.println(movie);
        }
    }
}
